﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using Microsoft.WindowsAPICodePack.Taskbar;

namespace Infrastructure.Platform
{
    /// <summary>
    /// Extra functionality for Windows 7 and above
    /// </summary>
    public static class Windows7
    {
        #region Progress state
        
        /// <summary>
        /// Sets the taskbar button progress indicator's state
        /// </summary>
        /// <param name="state"></param>
        /// <param name="window"></param>
        public static void SetProgressState(TaskbarProgressBarState state, Window window)
        {
            if(TaskbarManager.IsPlatformSupported)
            {
                TaskbarManager.Instance.SetProgressState(state, window);
            }
        }

        /// <summary>
        /// Sets the taskbar button progress indicator's state
        /// </summary>
        /// <param name="state">The state.</param>
        public static void SetProgressState(TaskbarProgressBarState state)
        {
            if (TaskbarManager.IsPlatformSupported)
            {
                TaskbarManager.Instance.SetProgressState(state);
            }
        }

        #endregion
    }
}
